<link rel="stylesheet" href="css/bootstrap.min.css">
<table class="table">
    <tr>
        <th>文件名</th>
        <th>文件大小</th>
        <th>文件类型</th>
        <th>文件创建时间</th>
        <th>最后修改时间</th>
    </tr>
    <?php
    include "util/ShowDir.php";
    date_default_timezone_set("PRC");
    $dir =  getcwd();

    $dir_arr = getDir($dir);
    if ($_GET['dir']!=""){
        $dir = $dir."\\".$_GET['dir'];
        $dir_arr = getDir($dir);

    }
    echo $dir;
    foreach ($dir_arr as $file){
   ?>
            <tr>
                <?php if (is_dir($file)){?>
                    <td><a href="show_file.php?dir=<?php echo $file?>"><?php echo $file?></a></td>
                <?php }else{ ?>
                    <td><a href="#"><?php echo $file?></a></td>
                <?php }?>
                <td><?php echo filesize($dir."\\".$file)?></td>
                <td><?php echo filetype($dir."\\".$file )?></td>
                <td><?php echo date("Y-m-d H:i:s",filectime($dir."\\".$file))?></td>
                <td><?php echo date("Y-m-d H:i:s",fileatime($dir."\\".$file))?></td>
            </tr>
         <?php }?>
</table>
